
quartz(width=6.5,height=7.5)

par(mfrow = c(3, 3), pty = "s",family="Gill Sans MT",font.main=1,cex.lab=1.1)

load("~/Dropbox/complieropt/Polmeth Archive/Final Code/alpha 25000.rdata")

low <- simoutput[6,] < 0.33

RMSE <- apply(simoutput[7:nrow(simoutput),low],1,function(x) mean((x - simoutput[1,low])^2)^.5)

plot(RMSE~alphalist,main=paste("Low Compliance\nN =",N),type="l",ylim=c(min(c(RMSE)),min(c(5,max(c(RMSE))))),xlab=(expression(alpha)))
lines(x=rep(0.275,2),y=c(0.0001,1000))

med <- (simoutput[6,] < 0.50) & (0.33 <= simoutput[6,])

RMSE <- apply(simoutput[7:nrow(simoutput),med],1,function(x) mean((x - simoutput[1,med])^2)^.5)

plot(RMSE~alphalist,main=paste("Medium Compliance\nN =",N),type="l",ylim=c(min(c(RMSE)),min(c(5,max(c(RMSE))))),xlab=(expression(alpha)))
lines(x=rep(0.275,2),y=c(0.0001,1000))

high <- (simoutput[6,] >= 0.50)

RMSE <- apply(simoutput[7:nrow(simoutput),high],1,function(x) mean((x - simoutput[1,high])^2)^.5)

plot(RMSE~alphalist,main=paste("High Compliance\nN =",N),type="l",ylim=c(min(c(RMSE)),min(c(5,max(c(RMSE))))),xlab=(expression(alpha)))
lines(x=rep(0.275,2),y=c(0.0001,1000))

